package com.lingxu.base.system.manage.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.lingxu.base.system.manage.entity.MenuTree;
import com.lingxu.base.system.manage.entity.SysRoleMenu;

import java.util.List;

/**
 * @Description: 角色_菜单关联表
 * @Author: LingXu
 * @Date:   2021-01-04
 * @Version: V1.0.1
 */
public interface ISysRoleMenuService extends IService<SysRoleMenu> {

    void distributeRoleMenus(String roleId, List<String> menuIds);

    /**
     * 为角色取消菜单
     * @param roleId
     * @param menuIds
     * @return
     */
    Integer cancelRoleMenus(String roleId, String menuIds);

    /**
     * 为角色取消所有菜单
     * @param roleId
     * @return
     */
    Integer cancelRoleMenusAll(String roleId);


    void distributeRoleMenusAll(String roleId);

    List<MenuTree> queryExistMenuTreeByRoleid(String roleid);

    List<MenuTree> queryNotExistMenuTreeByRoleid(String roleid);

    int findMenu(List<String> roleids);
}
